{template header}
<script type="text/javascript">
function DriveRightScroll(){
	var RightDivObj = $('#RightScroll');
	var LeftDivObj = $('#LeftScroll');
	
	if (LeftDivObj.attr("scrollTop") < (RightDivObj.attr("scrollHeight") - RightDivObj.attr("clientHeight"))){
		RightDivObj.attr("scrollTop",LeftDivObj.attr("scrollTop"));
		RightDivObj.attr("scrollLeft",LeftDivObj.attr("scrollLeft"));
	}
}
function DriveLeftScroll(){
	var RightDivObj = $('#RightScroll');
	var LeftDivObj = $('#LeftScroll');
	if (RightDivObj.attr("scrollTop") < (LeftDivObj.attr("scrollHeight") - LeftDivObj.attr("clientHeight"))){
		LeftDivObj.attr("scrollTop",RightDivObj.attr("scrollTop"));
		LeftDivObj.attr("scrollLeft",RightDivObj.attr("scrollLeft"));
	}
}
</script>
<script type = "text/javascript" src = "js/compare.js"></script>
<section class="wrap clearfix version columns">
	<h2 class="col-h2"><a href="index.php" target="_self">{$setting['site_name']}</a> &gt; <a href="{url doc-view-$doc['did']}" target="_self">{$doc['title']}</a> - <strong>{lang compare}</strong></h2><a href="{url doc-view-$doc['did']}" target="_self" class="more">{lang backDoc}</a>
	<div class="edition">
	<table class="table l"><thead><tr><td>{lang edition}</td><td>{lang editTime}</td><td>{lang editionCreator}</td><td>{lang docLength}</td><td>{lang image}</td></tr></thead>
	<tr>
		<td>{$edition[0]['editions']}</td>
		<td>{$edition[0]['time']}</td>
		<td><a href="{url user-space-$edition[0]['authorid']}">{$edition[0]['author']}</a></td>
		<td>{$edition[0]['words']}{lang word}</td>
		<td>{$edition[0]['images']}{lang piece}</td>
	</tr><tr><td colspan="5" class="f20">{$doc['title']}</td></tr>
	</table>
	<table class="table r"><thead><tr><td>{lang edition}</td><td>{lang editTime}</td><td>{lang editionCreator}</td><td>{lang docLength}</td><td>{lang image}</td></tr></thead>
	<tr>
		<td>{$edition[1]['editions']}</td>
		<td>{$edition[1]['time']}</td>
		<td><a href="{url user-space-$edition[1]['authorid']}">{$edition[1]['author']}</a></td>
		<td>{$edition[1]['words']}{lang word}</td>
		<td>{$edition[1]['images']}{lang piece}</td>
	</tr><tr><td colspan="5" class="f20">{$doc['title']}</td></tr>
	</table>
	</div>
	<div id="LeftScroll" class="LeftFrame" onscroll="DriveRightScroll()">
		<span id="LeftContent" align="left">{$edition[0]['content']}</span>
	</div>
	<div id="RightScroll" class="RightFrame" onscroll="DriveLeftScroll()">
		<span id="RightContent" align="left">{$edition[1]['content']}</span>
	</div>

<p class="l col-p"><label class="fanwei"></label>{lang compareTip1} <label class="dian"></label>{lang compareTip2} </p>
</section>
<script type="text/javascript">CompareById('LeftContent', 'RightContent');</script>
{template footer}